#!/bin/bash

host=$1
pass=$2

cpuinfo=`/usr/bin/sshpass -p readwrite ssh -p 4118 root@$host "cat /proc/meminfo"`
mem_total=`echo "$cpuinfo"|awk '/MemTotal/ {print $2}'`
mem_free=`echo "$cpuinfo"|awk '/MemFree/ {print $2}'`
mem=`expr $mem_total - $mem_free`

#echo "LowTotal: $low_total"
#echo "LowFree:  $low_free"
echo -n $mem
